package com.sdg.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface APPDao {
	
	
//	@Select("SELECT CONCAT(,'-',MONTH) name , monday  val FROM WEEKday_count  WHERE YEAR = '2016' limit 8")
	@Select("SELECT ride_year name , SUM(ride_count)  value FROM left1_year_count GROUP BY  ride_year LIMIT 8")
	public List<Map<String,Object>> getAge();//年龄分析
	
	// 
//	@Select("select name,val  from part2 group by name limit 10")
//	public List<Map<String,Object>> getPart2();

	@Select("select fare_bucket name,sum(count) val  from left2_take_count group by fare_bucket order by fare_bucket limit 10")
	public List<Map<String,Object>> getPart2();


	@Select("SELECT provinces name,SUM(ride_count) val  FROM middle1_china_map GROUP BY provinces ")
	List<Map<String, Object>> getChinaMap();
    
	@Select("select distance_bucket name,sum(count) val  from right1_distance group by distance_bucket  order by distance_bucket limit 10")
	public List<Map<String,Object>> getPart4();

	@Select("SELECT ride_year name , SUM(average_income)  value FROM right2_year_amount GROUP BY   ride_year  LIMIT 8")
	public List<Map<String,Object>> getPart5();


}
